<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://shiro.apache.org/tags" prefix="shiro" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="/common/commonCss.jsp" />
<jsp:include page="/common/commonJs.jsp" />
<script src="${basePath}commonJs/jquery.ztree.all.js"></script>
<title>嘉童游乐中心-新增库存调整</title>
<script type="text/javascript">
		var selectNode=null;
		var treeNodes=[];
		//选中的商品
		var selectPrds=[];
		//商品id
		var excludeId=[];
		var resverseTypes=[6,61];
		var resverseTypesVal=[6,61];
		//选中的商品
		var selectPrds=[];
		//商品id
		var savedPrdId=[];
		var index = 0;
		var setting = {
			data: {
				simpleData: {
					enable: true
				}
			},
			callback:{
				onClick:zTreeOnClick
			}
		};
		
		 $(document).ready(function(){
			 //获得上次保存的调整商品
			getSavedBeans();
			getTreeData();
			$("#resverseTypes").val(resverseTypesVal.join());
			$.fn.zTree.init($("#sptree"), setting, treeNodes);
			getDefaultSelectIds();
			
		}); 
		
		 function getSavedBeans()
		 {
			 $.ajax({
					url:"${basePath}StockCorrect/getSavedCorrectPrds.shtml",
					data:{"fkStgadjId":"${scmStgAdj['pkStgadjId']}","fkBranId":"${scmStgAdj['fkBranId']}"},
					dataType:"json",
					type:"post",
					async:false,
					success:function(result)
					{
						initCorrectTable(result);
						initSelectPrds();
						//保存数据库中已经存在调整商品id
						savedPrdId=excludeId;
					},
					error : function(XMLHttpRequest) {
						ajaxError(XMLHttpRequest);
					}
				});
		 }
		 
		 function initCorrectTable(data) {
				if(data == null)
					{
						return;
					}
				trimJsonArray(data); 
				html = "";
				$.each(data, function(ind, obj)
				{
					
					var num = (obj.stgCnt == "" ? 0 : obj.stgCnt);
					html += "<tr><td>" + (parseInt(1) + ind) + "</td>";
					html += "<td>" + obj.pkPrdId + "</td>";
					html += "<td>" + obj.prdName + "</td>";
					html += "<td>" + obj.cateName + "</td>";
					html += "<td>" + obj.prdSpec + "</td>";
					html += "<td>" + obj.unitName + "</td>";
					html += "<td>" + obj.stkCnt + "</td>";
					html += "<td>" + num + "</td>";
					html += "<td><input type='text' class='iput_t w100' value='"+obj.adjCnt+"' onchange=\"checkCnt(this);\"></td>";
					html += "<td><input type='text' value='"+obj.comments+"' class='iput_t w100'></td>";
					html += "<td><input type='button' fkPrdId='"+obj.pkPrdId+"' onclick=\"removeVal(this);\" class='btn_l' value='删除'/></td></tr>";
				});
				$("#tbody").html(html);
			}
		 
		 function initSelectPrds() {
			 selectPrds = [];
			 excludeId = [];
			 $("#selectProduct tr").each(function (){
					var pkPrdId = $(this).find("td:eq(1)").html();
					var prdName = $(this).find("td:eq(2)").html();
					var cateName = $(this).find("td:eq(3)").html();
					var prdSpec = $(this).find("td:eq(4)").html();
					var unitName = $(this).find("td:eq(5)").html();
					var stkCnt = $(this).find("td:eq(6)").html();
					var stgCnt = $(this).find("td:eq(7)").html();
					var adjCnt = $(this).find("td:eq(8)").find("input").val();
					var comments = $(this).find("td:eq(9)").find("input").val();
					selectPrds.push(pkPrdId + "_" + prdName + "_"
							+ cateName + "_" + prdSpec + "_"
							+ unitName + "_" + stkCnt + "_" +stgCnt
							+"_"+adjCnt +"_"+comments);
					excludeId.push(pkPrdId);
					
				});
		 }
		 
		function zTreeOnClick(event, treeId, treeNode) {
			selectNode = treeNode;// 每次点击赋值 
			//点击根节点，显示所有商品
			if(selectNode.getParentNode() == null)
			{
			 	//select1("allstockQueryForm");
			 	$("#selectId").val("");
			}
			else
			{
				$("#sptree_1_a").removeClass("curSelectedNode");
				//选中的商品id
				var selectId=[];
				selectId = getSelectIds(selectId,treeNode);
				$("#selectId").val(selectId.join());
				select1("goodsOutForm");
			}
		};
		
		//默认选中普通商品并显示普通商品以及子类商品
		function getDefaultSelectIds()
		{
			var treeObj = $.fn.zTree.getZTreeObj("sptree");
			var node = treeObj.getNodeByParam("name", "普通商品", null);
			treeObj.selectNode(node);
			var selectId=[];
			selectId = getSelectIds(selectId, node);
			$("#selectId").val(selectId.join());
		}
		
		//嵌套循环获得被选中商品及其子类商品的id
		function getSelectIds(selectId, treeNode) {
		selectId.push(treeNode.id);
		if (treeNode.isParent) {
			for ( var obj in treeNode.children) {
				getSelectIds(selectId, treeNode.children[obj]);
			}
		}
		return selectId;
		}
		
		/*获得商品分类的信息*/
		function getTreeData() {
		$.ajax({
			url : "${basePath}scmInvocing/productInfo/findCategoryList.shtml",
			data:{"resverseTypes":resverseTypes.join()},
			dataType : "json",
			type : "post",
			async : false,
			success : function(result) {
				var node;
				$(result).each(function(id, item) {
					if (id == 0) {
						node = {
							id : item.pkPrdcateId,
							pId : item.fkParPrdcateId,
							name : item.cateName,
							open : true,
							reserveFlag : item.reserveFlag,
							resverseType : item.resverseType
						};
					} else {
						node = {
							id : item.pkPrdcateId,
							pId : item.fkParPrdcateId,
							name : item.cateName,
							reserveFlag : item.reserveFlag,
							resverseType : item.resverseType
						};
					}
					treeNodes.push(node);
				});
			},
			error : function(XMLHttpRequest) {
				ajaxError(XMLHttpRequest);
			}
		});
		}
		
		function initTable(formId) {//库存查询分页显示
		var prdIdValue = $.trim($("#pkPrdIdValue").val());
		$("#pkPrdId").val(prdIdValue);
		var prdName = $.trim($("#prdNameValue").val());
		$("#prdName").val(prdName);
		
		var prdIdValue = $.trim($("#pkPrdIdValue").val());
		$("#pkPrdId2").val(prdIdValue);
		var prdName = $.trim($("#prdNameValue").val());
		$("#prdName2").val(prdName);
		
		var form = $("#" + formId);
		var pagenbean = new PageBean(form);
		pagenbean.setTableId("goodsOutTable");
		pagenbean.setCallback(callback);
		pagenbean.setFootId("goodsOutFoot");
		setPagebeanObj(pagenbean);
		pagenbean.doPage();
		}
		
		function callback(data) {
			if (data == null) 
			{
				return;
			}
			trimJsonArray(data);
			$.each(data,function(ind, obj) {
				var i = ind + 1;
				var htm = "<tr>";
				var num = (obj.stgCnt == "" ? 0 : obj.stgCnt);
				htm += "<td><input name='chkItem' type='checkbox' value='"+obj.pkPrdId+"'/></td>";
				htm += "<td stkCnt='"+obj.stkCnt+"'>" + i + "</td>";
				htm += "<td>" + obj.pkPrdId + "</td>";
				htm += "<td name='prdName'>"+ obj.prdName + "</td>";
				htm += "<td name='cateName'>"+ obj.cateName + "</td>";
				htm += "<td name='prdSpec'>"+ obj.prdSpec + "</td>";
				htm += "<td name='unitName'>" + obj.unitName + "</td>";
				htm += "<td name='stgCnt'>" + num + "</td></tr>";

				$("#goodsOutTable").find("tr:eq(" + ind + ")")
						.after(htm);
			});
				$("[name = chkItemAll]:checkbox").attr("checked", false);
				doChecked($("#selectAll"));
		}
		
		//设置pageNo为1
		function select1(formId) {
		$("#" + formId + " input:hidden[name='pageNo']").val(1);
		initTable(formId);
		}
		
		function select2(formId) {
			$("#" + formId + " input:hidden[name='pageNo']").val(1);
			$("#selectId").val("");
			initTable(formId);
			}
		
		//添加商品
		function addSelectGoods() {
			$("[name = selectAll]:checkbox").attr("checked",false);
			//获取当前列表已经选中的id值
			$("#excludeId").val(excludeId.join());
			initTable("goodsOutForm");
			$('#addSelectGoods').window('open');
		}
		
		function doChecked(o){
			$("[name = chkItem]:checkbox").attr("checked", o.attr("checked") == 'checked');
		}
		
		//新增出货商品全选、全不选
		$(function() {
			$("#selectAll").bind("click", function() {
				doChecked($(this));
			});

			//获取选中商品信息
			$("#addGoods").bind("click",function() {
				//重新构造数组,记录原有数据
				initSelectPrds();
				var pkPrdId;
				var stkCnt;
				var cateName;
				var prdSpec;
				var unitName;
				var stgCnt;
				var len = $("[name = chkItem]:checked").length;
				if (len == 0) {
					alertInfo("未选择出库商品");
					return;
				}
				$("[name = chkItem]:checked").each(
					function() {
						tr = $(this).parent().parent();
						pkPrdId = $(this).val();
						stkCnt = $(tr).find("td:eq(1)").attr("stkCnt");
						prdName = $(tr).find("td:[name='prdName']").html();
						cateName = $(tr).find("td:[name='cateName']").html();
						prdSpec = $(tr).find("td:[name='prdSpec']").html();
						unitName = $(tr).find("td:[name='unitName']").html();
						stgCnt = $(tr).find("td:[name='stgCnt']").html();
						selectPrds.push(pkPrdId + " _" + prdName + "_"
								+ cateName + "_" + prdSpec + "_"
								+ unitName + "_" + stkCnt + "_" +stgCnt);
						excludeId.push(pkPrdId);
					});
				$('#addSelectGoods').window('close');
				showSelectProduct();
				$("#selectAll").attr("checked", false);
			});
		});
		
		//显示新增商品
		function showSelectProduct() {
			var data;
			var html = "";
			document.getElementById("selectProduct").style.display = "";
			for (var i = 0; i < selectPrds.length; i++) {
				data = selectPrds[i].split("_");
				if($.trim(data[5]) != "" && !isNaN(data[5])){
					if(data[5]-data[6] != 0){
						html += "<tr><td>" + (parseInt(1) + i) + "</td>";
						html += "<td>" + data[0] + "</td>";
						html += "<td>" + data[1] + "</td>";
						html += "<td>" + data[2] + "</td>";
						html += "<td>" + data[3] + "</td>";
						html += "<td>" + data[4] + "</td>";
						html += "<td>" + data[5] + "</td>";
						html += "<td>" + data[6] + "</td>";
						if(typeof(data[7]) == 'undefined')
							{
							 if($.trim(data[5]) != "" && !isNaN(data[5]))
								 {
									 html += "<td><input type='text' class='iput_t w100' stg = '"+data[6]+"' value='"+(data[6]-data[5])+"'  onchange=\"checkCnt(this);\"></td>";
								 }
							 	else
								 {
									 html += "<td><input type='text' class='iput_t w100' stg = '"+data[6]+"' onchange=\"checkCnt(this);\"></td>";
								 }
							 html += "<td><input type='text' class='iput_t w100' ></td>";
							}
						else
							{
								html += "<td><input type='text' class='iput_t w100' stg = '"+data[6]+"' value='"+data[7]+"' onchange=\"checkCnt(this);\"></td>";
								html += "<td><input type='text' class='iput_t w100' value='"+data[8]+"'></td>";
							}
						
						html += "<td><input type='button' fkPrdId='"+data[0]+"' onclick=\"removeVal(this);\" class='btn_l' value='删除'/></td></tr>";
					}
				}
			}
			$("#tbody").html(html);
		}

		function checkCnt(obj) {
			var v = $(obj).val();
			var stg = $(obj).attr("stg");
			if ($.trim(v) != "")//去空格
			{
				if (isNaN(v) || (v.indexOf(".") > -1)) {
					alertError("请输入整数");
					$(obj).val("");
					$(obj)[0].focus();
					return;
				}
				 if(parseInt(stg) - parseInt(v) < 0)
				{
					alertError("按此数量调整后，库存为负！请修改！");
					$(obj).val("");
					$(obj)[0].focus();
					return;
				}
			}
		}
		
		//从出库表删除商品
		function removeVal(obj) {
		//数据库中删除当前项
		 var id= $(obj).attr("fkPrdId");
		 for(var prd in savedPrdId )
			 {
			 if(id == savedPrdId[prd])
				 {
				    delPrds(id,obj);
				 }
			 }
		$(obj).parent().parent().remove();
		 //重新构造数组
		 initSelectPrds();
		 //刷新表格
		 //showSelectProduct();
		}
		
		//删除数据库中存在的调整商品
		function delPrds(fkPrdId,obj)
		{
			$.ajax({
				url:"${basePath}StockCorrect/delStgadjPrds.shtml",
				data:{"fkPrdId":fkPrdId,"fkStgadjId":"${scmStgAdj['pkStgadjId']}"},
				dataType:"text",
				type:"post",
				async:false,
				success:function (result)
				{
					if(result != 1)
					{
						alertError($common_delete_failure);
					}
				},
				error : function(XMLHttpRequest) {
					ajaxError(XMLHttpRequest);
				}
			});	
		}
		
		function reApply(isSubmit)
		{
			
			$.messager.confirm('提示', '确认要重新申请吗?', function(r) {
				if (r) {
				$("#handleResult").val("3"); //重新申请
				saveScmStgadjPrds(isSubmit);
				}
			});
		}
		
		
		//保存/提交库存调整
		function saveScmStgadjPrds(isSubmit)
		{
			var isOk = true;
			$("#selectProduct tr").each(function(){
				var adjCnt = $(this).find("td:eq(8)").find("input").val();
				if(adjCnt == "")
					{
						isOk = false;
					}
			});
			
			if(!isOk)
				{
					alertError("请填写完调整数量或删除不需要调整的商品");
					return;
				}
			
			var contents = "";
			$("#selectProduct tr").each(function(){
				var fkPrdId = $(this).find("td:eq(1)").html();
				var stgCnt = $(this).find("td:eq(7)").html();
				var stkCnt = $(this).find("td:eq(6)").html();
				var adjCnt = $(this).find("td:eq(8)").find("input").val();
				var comments = $(this).find("td:eq(9)").find("input").val();
				contents += fkPrdId+"_"+stgCnt+"_"+(stkCnt==""?"null":stkCnt)+"_"+adjCnt+"_"+comments+"|";
			});
			if (contents == "") {
				alertError("请添加需要库存调整的商品");
				return;
			}
			if (isOk) {
				$("#contents").val(contents);
				$("#isSubmit").val(isSubmit);
				$.ajax({
					url: "${basePath}StockCorrect/saveScmStgadjPrdsForEdit.shtml",
					data: $("#stockAddCorrect").serialize(),
					dataType:"text",
					type: "post",
					async: false,
					success: function(result) {
						if (result == 1) {
							//window.location.href = "${basePath}StockCorrect/toStockCorrect.shtml";
							$("#toCorrect")[0].submit();
						}
						if (result == 0) {
							alertError("库存调整失败，请检查网络重新操作");
						}
					},
					error : function(XMLHttpRequest) {
						ajaxError(XMLHttpRequest);
					}
				});
			}
		}
		
</script>
</head>
<body class="bg">
<div class="content m_auto">
	<div class="content_l mt10">
    	<ul>
    	 <shiro:hasPermission name="StockGoodsIn/toStock_goodsIn.shtml">
       		<li><a href="${basePath}StockGoodsIn/toStock_goodsIn.shtml"><i class="nav_icon_b"></i><br>商品入库</a></li>
			</shiro:hasPermission>
		<shiro:hasPermission name="StockQuery/toStockQuery.shtml">
			<li><a href="${basePath}StockQuery/toStockQuery.shtml"><i class="nav_icon_b"></i><br>库存查询</a></li>
			</shiro:hasPermission>
		<shiro:hasPermission name="StockGoodsOut/toStockGoodsOut.shtml">
			<li><a href="${basePath}StockGoodsOut/toStockGoodsOut.shtml"><i class="nav_icon_b"></i><br>商品出库</a></li>
			</shiro:hasPermission>
		<shiro:hasPermission name="StockTaking/toStockTaking.shtml">
			<li><a href="${basePath}StockTaking/toStockTaking.shtml"><i class="nav_icon_a"></i><br>库存盘点</a></li>
            </shiro:hasPermission>
		<shiro:hasPermission name="StockCorrect/toStockCorrect.shtml">
            <li class="content_hover"><a href="${basePath}StockCorrect/toStockCorrect.shtml"><i class="nav_icon_f"></i><br>库存调整</a></li>
        </shiro:hasPermission>
        </ul>
    </div>
    <div class="content_r mt10">
    	<div class="p20">
    	<div class="file_single_dl f14 fixed">
       		 <dl class="fixed"  >
                <dd ><label> 库存调整申请编号：</label>${scmStgAdj['pkStgadjId']}</dd>
                <dd><label>创建人：</label>${scmStgAdj['usrName']}</dd>
                <dd><label>创建时间：</label>${applyTime}</dd>
            </dl>
         </div>
         	<div id="scrollTable" style="width:1120px; height: 348px;">
            <table class="table">
          	    <col width="80px"></col>
                <col width="130px"></col>
                <col width="100px"></col>
                <col width="100px"></col>
                <col width="80px"></col>
                <col width="80px"></col>
                <col width="120px"></col>
                <col width="130px"></col>
                <col width="120px"></col>
                <col width="120px"></col>
                <col></col>
                <tbody>
                 	<tr>
                    	<th>序号</th>
                        <th>商品编号</th>
                        <th>商品名称</th>
                        <th>商品分类</th>
                        <th>规格</th>
                        <th>单位</th>
                        <th>盘点实际数量</th> 
                        <th>商品实际库存数量</th> 
                        <th>调整数量</th> 
                        <th>调整原因</th> 
                        <th>操作</th> 
                     </tr>
                     </tbody>
                  </table>
           <div  style="height: 318px;">
            <table class="table" id="selectProduct" >
				<col width="80px"></col>
                <col width="130px"></col>
                <col width="100px"></col>
                <col width="100px"></col>
                <col width="80px"></col>
                <col width="80px"></col>
                <col width="120px"></col>
                <col width="130px"></col>
                <col width="120px"></col>
                <col width="120px"></col>
                <col></col>
                <tbody id="tbody">
                  
                </tbody>
            </table>
            </div>
        </div>
         <c:if test="${scmStgAdj.status != '1'}">
        <dl class="fixed order_dl">
        <dd><label><b>处理历史：</b></label>
                     <dd>
                         <table class="table">
                             <tr>
                                 <th>时间</th>
                                 <th>处理人</th>
                                 <th>结果</th>
                                 <th>处理意见</th>
                             </tr>
                             <c:forEach items="${scmStgAdj.workflowVo.optHisVoList}" var="his">
								<tr>
								<td style="width: 40%">${his.optTime }</td>
								<td>${his.optName }</td>
								<td>${his.result }</td>
								<td title="${his.advice}">
								<c:if test="${his.advice != null}">
									<c:choose>
										<c:when test="${his.advice.length() > 5}">
											${his.advice.substring(0,5)}...
										</c:when>
										<c:otherwise>
											${his.advice}
										</c:otherwise>
									</c:choose>
								</c:if>
								</td>
							</tr>
							</c:forEach>
                         </table>
                     </dd>
                     </dl>
                     </c:if>
             <div class="page m10">
            	<div class="btm_btn m10">
                    <dl>
                    <dd><input class="btn" type="button" value="新增" onClick="addSelectGoods();"></dd>
                    <c:choose>
						<c:when test="${scmStgAdj.workflowVo.isStartUser == '1' && scmStgAdj.workflowVo.isCurrtOpt == '1'}">
                      	<dd><input type="button" class="btn" id="reApply" value="提交" onClick="reApply('true');" /></dd>
						</c:when>
						<c:otherwise>
						<dd><input class="btn" type="button" value="提交" onClick="saveScmStgadjPrds('true');"></dd>
						</c:otherwise>
						</c:choose>
                        <!-- <dd><input class="btn" type="button" value="保存" onClick="saveScmStgadjPrds('false');"></dd> -->
                        <dd><input class="btn" type="button" value="返回" onClick="javascript:window.location.href='${basePath}StockCorrect/toStockCorrect.shtml'"></dd>
                    </dl>
                </div>
            </div>
        </div>
        </div>
</div>

	<!-- 表单 -->
	<form action="${basePath}StockQuery/findProductListForStock.shtml" id="goodsOutForm" method="post" >
		<input type="hidden" name="pageNo" value="1">
		<input type="hidden" name="pageSize" value="8">
		<input type="hidden" name="pkPrdId" id="pkPrdId">
		<input type="hidden" name="prdName" id="prdName">
		<input type="hidden" name="selectId" id="selectId">
		<input type="hidden" name="excludeId" id="excludeId" />
		<input type="hidden" name="fkTskId" value="${scmStgAdj['fkTskId']}"/>
		<input type="hidden" name="resverseTypes" id="resverseTypes"/>
		<input type="hidden" name="fkBranId" value="${scmStgAdj['fkBranId']}">
	</form>
	
	<form action="${basePath}StockCorrect/saveScmStgadjPrdsForEdit.shtml" id="stockAddCorrect" method="post">
		<input type="hidden" name="contents" id="contents">
		<input type="hidden" name="pkStgadjId" value="${scmStgAdj['pkStgadjId']}">
		<input type="hidden" name="fkBranId" value="${scmStgAdj['fkBranId']}">
		<input type="hidden" name="fkTskId" value="${scmStgAdj['fkTskId']}">
		<input type="hidden" name="modiBy" value="${userId}">
		<input type="hidden" name="savedPrd" value="${savedPrd}">
		<input type="hidden" name="isSubmit" id="isSubmit">
		<input type="hidden" name="businessKey" value="${scmStgAdj.pkStgadjId }" />
		<input type="hidden" name="processInstanceId" value="${scmStgAdj.fkFlowinstId }"/> 
		<input type="hidden" name="handleResult" id="handleResult" />
	</form>
	
	<form action="${basePath}StockCorrect/toStockCorrect.shtml" id="toCorrect">
	</form>
	
	<form action="${basePath }StockCorrect/completeStockCorrect.shtml" method="post" id="form2" name="form2">
		<input type="hidden" name="handleResult" id="handleResult" />
		<input type="hidden" name="fkBranId" value="${scmStgAdj['fkBranId']}" />
		<input type="hidden" name="modiBy" value="${scmStgAdj['applyBy']}" />
		<input type="hidden" name="businessKey" value="${scmStgAdj.pkStgadjId }" />
		<input type="hidden" name="processInstanceId" value="${scmStgAdj.fkFlowinstId }"/> 
	</form>
	<!-- 表单 -->
<!---弹出层 成员信息编w辑--->
<div id="addSelectGoods" class="easyui-window" title="新增库存调整商品" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width: 1224px; height: 500px; position: relative;">
			<div class="content m_auto">
					<div class="p20">
						<div class="file_single_dl f14 fixed">
							<dl class="fixed" style="overflow: hidden">
								<dd>
									<label>商品编号：</label><input type="text" class="iput_t w200"
										id="pkPrdIdValue">
								</dd>
								<dd>
									<label>商品名称：</label><input type="text" class="iput_t w200"
										id="prdNameValue">
								</dd>
								<dd>
									<input type="button" class="btn fr" value="查询"
										onclick="select2('goodsOutForm');">
								</dd>
							</dl>
						</div>

						<div class="tab_normal mt10" style="height: 200px;">
							<ul class="fixed" id="tab_a"></ul>
							<div class="payment_l tc" style="height: 342px;width: 180px !important;">
								<div  class="ztree m10" id="sptree" style="overflow-y: auto;width: 160px; height: 315px;"></div>
								</div>
							<ul class="fixed" id="tab_conbox_a"
								style="height: 340px !important; width: 1200px;">
								<li class="p10 " style="margin-left: 200px">
									<table class="table" id="goodsOutTable">
										<tr>
											<th><input name='chkItemAll' type="checkbox" id="selectAll"/></th>
											<th>序号</th>
											<th>商品编号</th>
											<th>商品名称</th>
											<th>商品分类</th>
											<th>规格</th>
											<th>计量单位</th>
											<th>库存数量</th>
										</tr>
									</table> 
										<input class="btn mt10 fl" type="button" value="确定" id="addGoods">
										<input class="btn mt10 ml10 fl" type="button" value="返回" onClick="$('#addSelectGoods').window('close')">									
									<!----翻页----->
									<div class="page fr m10" id="goodsOutFoot"></div> 
									<!----翻页----->
								</li>
							</ul>
					</div>
				</div>
			</div>
		</div>
</body>
</html>